@/*
名称查询条件标签的参数说明:

name : 查询条件的名称
id : 查询内容的input框id
type： 需要显示的类型
checked: checkbox时选中状态
placeholder: 默认文本内容
isTime: 是否显示日期，
pattern: 日期显示geshi
value: 数值
items： type="select"时的数据源,数据源为map类型
@*/
<div class="input-group">
    <div class="input-group-btn">
        <button data-toggle="dropdown" class="btn btn-white dropdown-toggle"
                type="button" onclick="clear${id}();">${name}
        </button>
    </div>
    @var inputType = "text";
    @if(isNotEmpty(type)){
    @ inputType = type;
    @}
    @if(inputType == "date") {
    <input type="text" class="form-control layer-date"
           onclick="laydate({istime: ${isTime}, format: '${pattern}'})" id="${id}" value="${value!}"/>

    @} else if(inputType == "select") {
    <select class="form-control" id="${id}"
            multiple="multiple"
    >
        @if(isNotEmpty(items)){
        @for (item in items) {
        <option id="${item.key}" value="${item.key}">${item.value}</option>
        @}
        @}
    </select>
    @}else {
    <input type="${inputType}"
            @if(isNotEmpty(checked)){
            checked="${checked}"
            @}
            @if(isNotEmpty(placeholder)){
            placeholder="${placeholder}"
            @}
            class="form-control" id="${id}"/>
    @}

</div>
<script type="text/javascript">
    function clear${id}() {
        if ($('#${id}').attr('multiple') == "multiple"){
            $('#${id}').multiselect('selectAll',false);
            $('#${id}').multiselect('refresh');
        }else{
            $('#${id}').val('');
        }
    }
</script>